<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML表格与表单示例</title>
    <style>
        table { border-collapse: collapse; width: 100%; margin: 20px 0; }
        th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
        th { background-color: #f2f2f2; }
        .form-group { margin-bottom: 15px; }
        label { display: block; margin-bottom: 5px; }
        input, select, textarea { width: 100%; padding: 8px; box-sizing: border-box; }
        button { background-color: #4CAF50; color: white; padding: 10px 15px; border: none; cursor: pointer; }
        button:hover { background-color: #45a049; }
        .container { max-width: 800px; margin: 0 auto; padding: 20px; }
    </style>
</head>
<body>
    <div class="container">
        <h1>学生信息管理</h1>
        
        <h2>学生成绩表</h2>
        <table>
            <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>数学</th>
                    <th>英语</th>
                    <th>语文</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>2023001</td>
                    <td>张三</td>
                    <td>男</td>
                    <td>95</td>
                    <td>88</td>
                    <td>92</td>
                </tr>
                <tr>
                    <td>2023002</td>
                    <td>李四</td>
                    <td>女</td>
                    <td>89</td>
                    <td>94</td>
                    <td>87</td>
                </tr>
                <tr>
                    <td>2023003</td>
                    <td>王五</td>
                    <td>男</td>
                    <td>78</td>
                    <td>82</td>
                    <td>90</td>
                </tr>
            </tbody>
        </table>
        
        <h2>添加新学生</h2>
        <form action="#" method="post">
            <div class="form-group">
                <label for="student-id">学号：</label>
                <input type="text" id="student-id" name="student-id" required>
            </div>
            
            <div class="form-group">
                <label for="name">姓名：</label>
                <input type="text" id="name" name="name" required>
            </div>
            
            <div class="form-group">
                <label for="gender">性别：</label>
                <select id="gender" name="gender" required>
                    <option value="">请选择</option>
                    <option value="male">男</option>
                    <option value="female">女</option>
                </select>
            </div>
            
            <div class="form-group">
                <label for="math">数学成绩：</label>
                <input type="number" id="math" name="math" min="0" max="100" required>
            </div>
            
            <div class="form-group">
                <label for="english">英语成绩：</label>
                <input type="number" id="english" name="english" min="0" max="100" required>
            </div>
            
            <div class="form-group">
                <label for="chinese">语文成绩：</label>
                <input type="number" id="chinese" name="chinese" min="0" max="100" required>
            </div>
            
            <div class="form-group">
                <label for="remarks">备注：</label>
                <textarea id="remarks" name="remarks" rows="3"></textarea>
            </div>
            
            <button type="submit">提交</button>
            <button type="reset" style="background-color: #f44336; margin-left: 10px;">重置</button>
        </form>
    </div>
</body>
</html>
